package com.javaee.term.service.iml;

import com.javaee.term.model.Stockman;
import com.javaee.term.service.StockManService;
import com.javaee.term.service.base.BaseServiceIml;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author 陈伯瑞
 * date 2019/12/18 0018 12:50
 * version 1.0
 **/
@Service
public class StockManServiceImpl extends BaseServiceIml implements StockManService {
    @Override
    public Stockman findOne(Object id) {
        return stockmanMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Stockman> findAll() {
        return stockmanMapper.selectAll();
    }

    @Override
    public void delete(Object id) {
      stockmanMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Stockman stockman) {
        return stockmanMapper.insert(stockman);
    }

    @Override
    public int update(Stockman stockman) {
        return stockmanMapper.updateByPrimaryKey(stockman);
    }
}
